import instance from "@/utils/request.js";


const api={
    login(data){
        return instance({
            method: "POST",
            url: 'api/auth/login/',
            data
        })
    },
    register(data){
        return instance({
            method: "POST",
            url: 'api/auth/register/',
            data
        })
    },
    generate_image(data){
        // 开始生成图片
        return instance({
            method: "POST",
            url: 'api/comfyui/generate_image/',
            data
        })
    },

    get_prompt_image(data){
        // 获取生成的图片
        return instance({
            method: "POST",
            url: 'api/comfyui/get_prompt_image/',  // response: {}
            data
        })
    },
    get_history(data){
        // 获取历史生产的图片
        return instance({
            method: "POST",
            url: 'api/comfyui/history/',  // response: {}
            data
        })
    },
    translate_lang(data){
        // 翻译
        return instance({
            method: "POST",
            url: 'api/translate/get_translate/',  // response: {}
            data
        })
    },
}

export default api